Presentation View Modifiers
These view modifiers customize the appearance, sizing, and interaction behavior of views presented using sheet in the Scripting app. They allow for adaptive presentations, resizing with detents, background interaction control, and more.
Apply these modifiers to the root view of the sheet content (e.g.,
<VStack>,<NavigationStack>, or<List>).
presentationCompactAdaptation
Defines how a sheet adapts in compact horizontal or vertical size classes.
Type
PresentationAdaptation options:
"automatic"– System default behavior"fullScreenCover"– Adapts to full-screen presentation"sheet"– Adapts to sheet-style presentation"popover"– Adapts to popover-style (where supported)"none"– Disables adaptation
Example
presentationDragIndicator
Controls visibility of the drag indicator at the top of the sheet.
Type
Example
presentationDetents
Defines the available heights ("detents") that the sheet can rest at. If multiple detents are provided, the user can drag the sheet to resize it.
Type
PresentationDetent values:
"medium"– Approximately half screen height (not available in compact vertical size class)"large"– Full screen heightnumber > 1– A fixed height in pointsnumber between 0 and 1– A fractional height (e.g.,0.5means 50% of available height)
Example
presentationBackgroundInteraction
Defines whether and how the user can interact with views behind the presented sheet.
Type
Example
Allow background interaction up to a certain sheet size:
presentationContentInteraction
Controls how the sheet prioritizes resizing vs scrolling when the user swipes up.
Type
Description
"resizes": Swipe gesture first resizes the sheet, then scrolls content."scrolls": Content inside (e.g.,ScrollView) scrolls immediately."automatic": System default (usually prefers resizing first).
Example
presentationCornerRadius
Sets a custom corner radius for the sheet background.
